/**
 * v-hasRole 权限处理
 * Copyright (c) 2019 ruoyi
 */
import {authentication} from "@/jurisdiction/authentication";


export default {
  inserted(el, binding, vnode) {
    const {value} = binding
    if (value != null) {
      if (!authentication(value)) {
        el.parentNode && el.parentNode.removeChild(el)
      }
    } else {
      throw new Error(`请设置角色权限标签值"`)
    }
  }
}
